/*
package com.sprucetec.livechat.consumer;

import com.sprucetec.livechat.constants.MqConstant;
import com.sprucetec.livechat.consumer.process.MessageConsumerProcess;
import com.sprucetec.queue.enums.QueueMode;
import com.sprucetec.queue.redis.AbstractRedisQueueConsumer;
import com.sprucetec.queue.redis.annotation.RedisQueueConsumer;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;

*/
/**
 * @ClassName MessageConsumer
 * @Description:
 * @Author Kenny
 * @Date 2020/4/9
 **//*

@Slf4j
//@RedisQueueConsumer(value = "chatMessage", mode = QueueMode.Broadcast)
public class MessageConsumer extends AbstractRedisQueueConsumer<String> {

    @Autowired
    private MessageConsumerProcess messageConsumerProcess;

    */
/**
     * 如果你将整个redis 队列想象成一个 MQ中的topic的话，那么第一个参数为 Tag
     *
     * @param tag
     * @param message 消息
     *//*

    @Override
    public void doConsume(String tag, Object message) {
        if(message == null) return;
        switch (tag) {
            case MqConstant.NettyMessageRedisMq // 聊天信息
                    .REDISMSGCHAT:
                messageConsumerProcess.processChatMessage((String) message);
                break;
            case MqConstant.NettyMessageRedisMq
                    .REDISMSGCHATREMOVE:
                messageConsumerProcess.processChannelClose((String) message);
                break;
        }
    }
}
*/
